﻿using Microsoft.ApplicationBlocks.Data;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using ERB.App_Code;

public class Constants
{
    public static string UPLOAD_IMAGE_FOLDER = ConfigurationManager.AppSettings["upload_image_folder"];
    public static string Culture = "vi-VN";
}
public class Utility
{
    public static bool CheckPermission(string user, string url)
    {
        string sql = "SELECT COUNT(*) from serPermission WHERE UserName='" + user + "' AND ObjectName='" + url + "'";
        int i = Convert.ToInt32(SqlHelper.ExecuteScalar(DataServices.ConnectString, CommandType.Text, sql));
        return (i > 0);
    }
}